<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/common/taglib.jsp" %>
<!DOCTYPE html>
<html lang="ko">
<head>
<title> 한국의 논매기 소리 </title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta charset="utf-8">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link href="/css/reset.css" type="text/css" rel="stylesheet" />
<link href="/css/common.css" type="text/css" rel="stylesheet" />
<link href="/css/layout.css" type="text/css" rel="stylesheet" />
<link href="/css/ui.css" type="text/css" rel="stylesheet" />
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery-ui-1.10.4.custom.min.js" type="text/javascript"></script>
<!--script src="/js/gnb.min.js" type="text/javascript"></script-->
<script src="/js/gnb_ui.js" type="text/javascript"></script>
<script src="/js/left_menu.js" type="text/javascript"></script>
<script src="/js/ui.js" type="text/javascript"></script>
<script>
	//댑스별 메뉴 활성화
	var navCurrentParam1 = parseInt("${searchVO.searchIdxType}");//1depth
	var navCurrentParam2 = 0;//2depth
	var navCurrentParam3 = 0;//3depth
	
	function fncPage(page) {
		var frm = document.searchVO; 
		frm.page.value = page;
		frm.submit();
	}
</script>	
</head>
<body>
<form:form commandName="searchVO" name="searchVO" action="/item/indexService.do" method="get">
	<form:hidden path="searchIdxType"/>
	<form:hidden path="searchIdx"/>
	<form:hidden path="searchWord"/>
	<form:hidden path="searchType"/>
	<form:hidden path="page"/>
</form:form>
<!-- 메뉴건너뛰기 -->
<div id="skipnavigation">
	<a href="#header">상단메뉴 바로가기</a>
	<a href="#container">컨텐츠 바로가기</a>
	<a href="#footer">하단 바로가기</a>
</div>
<!-- //메뉴건너뛰기 -->
<div class="wrap">
	<!-- Header -->
	<jsp:include page="../common/header.jsp"></jsp:include>
	<!--// Header -->
	<!-- 컨텐츠 -->
	<div id="container" class="bg_sub">
		<div class="sub_wrap">
			<!-- 내용영역 -->
			<div class="sub_content">
				<div class="left_menu">
					<h2><img src="/img/leftMenu8.png" alt="색인서비스"/></h2>
					<!-- left 메뉴 -->
					<div id="left">
						<ul class="navmenu navmenu5">
							<li class="nvparam1"><a href="/item/indexService.do?searchIdxType=01">인명 색인</a></li>
							<li class="nvparam2"><a href="/item/indexService.do?searchIdxType=02">지명/기관명</a></li>
							<li class="nvparam3"><a href="/item/indexService.do?searchIdxType=03">작품명</a></li>
						</ul>
					</div>
					<!-- //left 메뉴 -->
				</div>
				<div class="sub_area">
					<!-- 서브 네비게이션 -->
					<ul class="sub_navi">
						<li><a href="/"><img src="/img/sub_navi1.gif" alt="home"/></a></li>
						<li><a href="#">색인 서비스</a></li>
						<c:if test="${searchVO.searchIdxType eq '01'}">
						<li class="sel_navi"><a href="#">인명 색인</a></li>
						</c:if>
						<c:if test="${searchVO.searchIdxType eq '02'}">
						<li class="sel_navi"><a href="#">지명/기관명</a></li>
						</c:if>
						<c:if test="${searchVO.searchIdxType eq '03'}">
						<li class="sel_navi"><a href="#">작품명</a></li>
						</c:if>
					</ul>
					<!-- //서브 네비게이션 -->
					<div class="sub_tit">
						<c:if test="${searchVO.searchIdxType eq '01'}">
						<h3><img src="/img/subMenu_tit14.gif" alt="인명 색인"/></h3>
						</c:if>
						<c:if test="${searchVO.searchIdxType eq '02'}">
						<h3><img src="/img/subMenu_tit13.gif" alt="지명/기관명"/></h3>
						</c:if>
						<c:if test="${searchVO.searchIdxType eq '03'}">
						<h3><img src="/img/subMenu_tit12.gif" alt="작품명"/></h3>
						</c:if>
					</div>
					<!-- 한글순 -->
					<div class="lang_box">
						<ul class="">
							<c:forEach var="codeInfo"  items="${idxList}" varStatus="counter">
								<c:choose>
									<c:when test="${codeInfo.codeId eq searchVO.searchIdx }">
										<li class="lang_ov"><a href="/item/indexService.do?searchIdxType=${searchVO.searchIdxType}&searchIdx=${codeInfo.codeId}">${codeInfo.codeName }</a></li>
									</c:when>
									<c:otherwise>
										<li><a href="/item/indexService.do?searchIdxType=${searchVO.searchIdxType}&searchIdx=${codeInfo.codeId}">${codeInfo.codeName }</a></li>
									</c:otherwise>
								</c:choose>
							</c:forEach>
						</ul>
					</div>
					<!-- //한글순 -->
					<!-- 리스트 검색창 -->
					<div class="ary_box">
						<div class="ary_left">
							<p>총 검색 결과 ${resultList.listCount}건 <em>[${paginationInfo.currentPageNo}/${paginationInfo.lastPageNoOnPageList} 페이지]</em></p>
						</div>
						<div class="ary_right">
							<select name="keywordType" title="선택해주세요" id="keywordType">
								<option value="01" selected="selected">제목</option>
								<option value="02">대체제목</option>
								<option value="03">가창자</option>
								<option value="04">녹음지역</option>
								<option value="05">곡해설</option>
							</select>
							<input type="text" class="it " title="내용을 입력하세요" value="" name="keyword" id="keyword" style="width:164px;"/>
							<input type="button" value="결과내재검색" class="btn_listSch" id="searchButton"/>
						</div>
					</div>
					<!-- //리스트 검색창 -->
					<!-- 리스트 목록 -->
					<div class="tb_integration_list">
						<table>
							<thead>
								<th class="tb_tit">번호</th>
								<th>내용</th>
							</thead>
							<tbody>
								<c:if test="${resultList.listCount eq 0}">
									<td colspan="2" style="text-align: center;">등록된 내용이 없습니다.</td>
								</c:if>
								<c:forEach var="itemInfo"  items="${resultList.list}" varStatus="counter">
								<tr>
									<td scope="row" class="tb_tit">${resultList.listCount - counter.index }</td>
									<td>
										<div class="sub_thumb_tx">
											<h3><a href="javascript:popdetail('${itemInfo.itemId }')">${itemInfo.itemNm }</a></h3>
											<p><em>가창자</em> : <span>${itemInfo.singerNm }</span></p>
											<p><em>녹음지역</em> : <span>${itemInfo.areaNm }</span> <a href="javascript:viewMap('${itemInfo.itemId }')" class="btn_point"><img src="/img/btn_point_sch.png" alt="위치검색"/></a></p>
											<p class="ellip_tx" style="width:504px;"><em>곡해설</em> : <span title="${itemInfo.songExplanationCntn }">${itemInfo.songExplanationCntn }</span></p>
										</div>
									</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
					<!-- //리스트 목록 -->
					<!-- 페이지 네비게이션 -->
					<div class="paginate_box">
						<div class="paginate_complex paginate_complex1">
							<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fncPage" />
							<input type="hidden" name="page" id="currentPage" />
						</div>
					</div>
					<!-- //페이지 네비게이션 -->
				</div>
			</div>
			<!-- //내용영역 -->
		</div>
	</div>
	<!-- //컨텐츠 -->
	<!-- 하단 -->
	<jsp:include page="../common/footer.jsp"></jsp:include>
	<!-- //하단 -->
</div>
<script type="text/javascript">
//<![CDATA[
(function ($) {
	$(document).ready(function() {
		//검색창
		$('.search').schSelect();
		//gnb 메뉴
		navigation("gnb_wrap", "slide");
		
		$( "#keyword" ).keypress(function( event ) {
			  if ( event.which == 13 ) {
				  searchWithinResults();
			  }
		});
		
		$( "#searchButton" ).click(function( event ) {
			searchWithinResults();
		});
	});
}(jQuery));
//]]>
</script>
</body>
</html>